# 代码编写者： 李朔
# 开发时间： 2021/7/30 17:23
numbers=[2,7,11,15]
target=9
def twoSum(numbers,target)->list:
    l,r=0,len(numbers)-1
    while l<r:
        if numbers[l]+numbers[r]==target:
            return [l+1,r+1]
        elif numbers[l]+numbers[r]<target:
            l+=1
        else:
            r-=1
print(twoSum(numbers,target))